home *** CD-ROM | disk | FTP | other *** search
/ Netware Super Library / Netware Super Library.iso / timevent / cronjr / manual.doc < prev    next >
Encoding:
Text File  |  1990-03-06  |  17.3 KB  |  469 lines

  1.  
  2.                     CRONJR
  3.                       By
  4.                 Software Shorts
  5.  
  6.  
  7.           Thank you for retrieving CRONJR.  This is a full working
  8.      version of CRONJR.
  9.  
  10.           CRONJR is a batch scheduler; it is used to run
  11.      stand alone programs at specific times and intervals.
  12.  
  13.  
  14.      Requirements
  15.      ------------
  16.  
  17.      MS-DOS based machine running MS-DOS 3.30 or higher.
  18.      MS-DOS versions below 3.1 - 3.21 may be used, but are not
  19.      recommended, since they require CRONJR to use more memory.
  20.  
  21.  
  22.      Background
  23.      ----------
  24.  
  25.           The reason for designing CRONJR was for lack of anything
  26.      better in the MS-DOS world.  Simple but powerful programs
  27.      like  cron (part of AT&T's Unix) or Sleeper  (public domain
  28.      for HP's MPE) are non existent for PC's.
  29.  
  30.           With more and more companies moving from mini-computers
  31.      to PC based LANs, one of the many things that has been lost
  32.      was the ability to schedule the nightly reporting and
  33.      maintenance programs needed to keep a business working during
  34.      the day.
  35.  
  36.           Sure, it's possible to just write a large batch file
  37.      that will run all your programs one after another.  That
  38.      solution is fine if it meets your needs.  But if you need
  39.      programs to run at specific times, and especially if your
  40.      business revolves around a LAN, then this product is for you.
  41.  
  42.      The solution
  43.      ------------
  44.  
  45.           There are 3 methods of scheduler implementation in a DOS
  46.      environment.
  47.  
  48.      Method 1
  49.  
  50.           Make a background RAM resident program that will
  51.           pop up when it is time to run the tasks.
  52.  
  53.      Method 2
  54.  
  55.           Make a foreground program that loads the tasks as
  56.           child processes.
  57.  
  58.      Method 3
  59.  
  60.           Make a transient program that is only in memory
  61.           when it is needed.  Therefore, all memory is
  62.           available for the task.
  63.  
  64.  
  65.      Faults for method 1
  66.      --------------------
  67.  
  68.           The last thing the world needs is another RAM
  69.           resident program to eat up memory, steal clock
  70.           cycles, and substitute custom interrupt vectors.  Most
  71.           LAN users already use 20-30k for their network shell,
  72.           and even more if they are running a NETBIOS emulator.
  73.  
  74.           The way most resident schedulers work is to stuff the
  75.           keyboard when it is time to execute a task.  This
  76.           method can be seen in various automatic tape backup
  77.           programs.  This method is unreliable since the assumption
  78.           is made that the DOS prompt is available, the command
  79.           line is clear, and the path is set.
  80.  
  81.      Faults for method 2
  82.      -------------------
  83.  
  84.           This method requires too much memory.  If you want to
  85.           run a batch file then you have to load another version
  86.           of COMMAND.COM on top of the parent scheduler. If you
  87.           want to run an .EXE or .COM file then you lose the
  88.           option of command line parameters and must resort to
  89.           running a batch file which brings us back to the first
  90.           problem of loading COMMAND.COM.
  91.  
  92.      Why method 3 is so swell
  93.      ------------------------
  94.  
  95.           1. It is so simple.  It relies heavily on two simple
  96.          operating system level batch files.
  97.  
  98.           2. It is not RAM resident so it uses no memory(*).
  99.  
  100.           *  The dreaded asterisk - If you are using a DOS
  101.          version below 3.3 then around 23k is lost because
  102.          COMMAND.COM needs to be invoked a second time.
  103.          It is strongly recommend that DOS 3.30 or above is
  104.          used.
  105.  
  106.  
  107.      How it works
  108.      ------------
  109.  
  110.           1.  The schedule file CRONJR.SCH is created by you. It
  111.      contains the timing parameters for the tasks to be executed.
  112.  
  113.           2. The master batch file, CRONJR.BAT, is loaded from the
  114.      command line.  That is your last intervention.
  115.  
  116.           3. The work file, CRONWK.BAT, is deleted by CRONJR.BAT.
  117.  
  118.           4. The scheduler program, CRON.EXE, is loaded and the
  119.      schedule file CRONJR.SCH is read.
  120.  
  121.           5. When the time comes to execute a process CRON.EXE
  122.      dumps its scheduling information to CRONJR.JOB, writes the
  123.      CRONWK.BAT bat file and unloads from memory to return control
  124.      to CRONJR.BAT.
  125.  
  126.           6. If CRONJR.BAT can find CRONWK.BAT then the CRONWK.BAT
  127.      work file is called/executed.
  128.  
  129.           7. Upon completion of CRONWK.BAT, control is returned to
  130.      CRONJR.BAT which then executes CRONJR.BAT (thus ending the
  131.      original CRONJR.BAT execution) with the parameter RELOAD
  132.      which is passed to CRON.EXE in step 4, which causes the file
  133.      CRONJR.JOB to be loaded rather than the file CRONJR.SCH .
  134.  
  135.  
  136.           Hard to follow?  Try this one. It is the remedial
  137.      version.
  138.  
  139.      CRONJR.BAT -> CRON.EXE -> CRONWK.BAT (YOUR TASK) ->CRONJR.BAT
  140.          A.           B.            C.                     A.
  141.  
  142.      Installation
  143.      ------------
  144.  
  145.           Create a directory for CRONJR, any name will do, and
  146.      copy the CRON.EXE program into the new directory. If you are
  147.      going to use CRONJR on a LAN with multiple machines running
  148.      CRONJR, then you must make a separate directory for each
  149.      machine.
  150.     
  151.      Examples:
  152.  
  153.           F:\CRON\386
  154.           F:\BOB\CRON
  155.           F:\CRON\486
  156.           F:\ACCTNG\CRON
  157.     
  158.           Each directory must contain its own CRONJR.SCH file and
  159.      its own unique CRONJR.BAT file.  A path may be set to point
  160.      to the location of CRON.EXE.
  161.     
  162.            For each CRONJR directory created, type CRON START at
  163.      their respective DOS prompt.  Such as:
  164.  
  165.           F:\CRON\386>cron start
  166.  
  167.           This will create the CRONJR.BAT file which is specific
  168.      to its home directory.  If you type out the CRONJR.BAT file
  169.      you will understand.
  170.  
  171.           Create a flat ASCII file (no tabs) named CRONJR.SCH or
  172.      edit the one on the distribution diskette.  Enter one task
  173.      per line using the following format.
  174.  
  175.      minute  hour  day_of_month  month  day_of_week  executable
  176.  
  177.           Example
  178.           -------
  179.  
  180.           50  16  *   *     MOTUWETHFR    f:\public\bin\killuser.EXE
  181.           0   17  *   *     MOTUWETHFR    f:\mtn_tape\databack.bat
  182.           0   5   *   *     MO            g:\acctng\weekly.bat
  183.           0   1   1   *   SUMOTUWETHFRSA  G:\ACCTNG\MONTHEND.EXE
  184.           0   1   1   1   SUMOTUWETHFRSA  G:\ACCTNG\YEARLY.EXE
  185.           49  16  *   *     MOTUWETHFR    C:\FUNNY\GOHOME.EXE
  186.           2i  *   *   *     MOTUWETHFR    F:\stream\kevin.bat
  187.  
  188.      Type CRONJR at the DOS prompt and you are finished.
  189.  
  190.           Field definitions
  191.           -----------------
  192.  
  193.           minute......: the minute of the hour you want your
  194.                 schedule to execute, 0 through 59.
  195.           hour........: the hour of the day in military time,
  196.                 0 through 23.
  197.           day_of_month: the day of the month 1 through 31.
  198.           month.......: the month of the year 1 through 12.
  199.           day_of_week.: the day of the week, SU MO TU WE TH FR SA.
  200.           executable..: a DOS executable string, .BAT, .EXE, and
  201.                 .COM files with a maximum combined path of
  202.                 64 characters.
  203.                 EXTENTIONS MUST BE USED!!!!!!
  204.  
  205.           Wild cards and increments
  206.           -------------------------
  207.  
  208.           *: execute on every occurrence - not used by day_of_week .
  209.           i: execute in increments - only applies to minute and
  210.          hour.  The 7th line in the example shows 2i which
  211.          means execute in 2 minute increments.  In theory this
  212.          task could be executed 30 times a hour.  Obviously *
  213.          must be used for every level after the first i .
  214.          Combinations of i in the minute and hour are not
  215.          recommended.  The expected outcome is that only the
  216.          hour increment will be used.
  217.  
  218.           Launch time
  219.           -----------
  220.  
  221.          Task checking and launching occur on the 1st second of
  222.           the minute.
  223.  
  224.  
  225.      EXTREMELY IMPORTANT
  226.      -------------------
  227.  
  228.           Be very careful when assigning launch times.  A 'feature'
  229.      of CRONJR is that it only launches tasks when CRON.EXE is
  230.      resident.  Example: you have 2 tasks set to execute at 19:00,
  231.      each takes 45 minutes to run, and few tasks scheduled at
  232.      19:15.  At 19:00 all 19:00 tasks are tagged for launching and
  233.      the first task will be launched at 19:00.  The 2nd task will
  234.      be launched when CRON.EXE is reloaded and thus effectively
  235.      launched at 19:45.
  236.  
  237.           Well it is now 19:46 and all tasks scheduled from 19:01
  238.      through 19:46 have missed their launch window.
  239.  
  240.           To prevent this from happening you should do the
  241.      following.  Schedule enough time between tasks.  The 19:15
  242.      tasks in the example should have been set later to 20:00, or
  243.      earlier to 19:00.  Had they been scheduled at 19:00 then they
  244.      would have run as part of the 19:00 launching.
  245.  
  246.           If you have an OS/2 version of CRONJR then this problem
  247.      can be completely avoided.
  248.  
  249.  
  250.      Proper scheduling
  251.      -----------------
  252.  
  253.           The best way to debug a faulty schedule is to run
  254.      CRON.EXE instead of CRONJR.BAT, and use the F1 key to exit to
  255.      DOS and change the time.  Inspect the CRONWK.BAT file that is
  256.      created.
  257.  
  258.           There is no limit to the number of tasks you can put
  259.      into the CRONJR.SCH file.
  260.  
  261.  
  262.      The competition
  263.      ---------------
  264.  
  265.           It was mentioned earlier that there are no programs
  266.      available similar to CRONJR.  Well that is no longer true.
  267.      There is product called PS-Batch from Brightwork Development.
  268.      Its list price is around $595.00, it must be licensed per
  269.      file server, it uses about 40k of memory and it is limited
  270.      to Netware.  CRONJR on the other hand is available for
  271.      $45.00, licensing is per site - not batch station or server,
  272.      it uses 0k of memory and will work on ANY LAN or stand alone
  273.      PC.
  274.  
  275.           I am sure PS-Batch is a fine product and has many more
  276.      features than CRONJR.  Many of these features were purposely
  277.      designed out of the original versions of CRONJR simply
  278.      because they were bells and whistles that no one wanted to
  279.      hear.
  280.  
  281.      Anomalies and hints
  282.      -------------------
  283.  
  284.           There are two known anomalies and one other point that you
  285.      need to remember.
  286.  
  287.           Anomaly 1.  Cronjr only executes tasks on the 1st second
  288.      of the minute.  Example.  If you had 3 tasks that each take 5
  289.      seconds to complete, and they are all scheduled to launch at
  290.      19:00 then they will be effectively launched at 19:00, 19:01
  291.      and 19:02.  This is a feature was designed into the product.
  292.  
  293.           Anomaly 2.  Anomaly 2 arises out of anomaly 1.  Example.
  294.      If you set up a schedule that has 3 jobs, each set to run in
  295.      increments of 10 minutes (10i * * * ...), you would assume
  296.      that they would execute at the 10, 20, 30, 40, 50, 00 minute
  297.      clock demarcations (assuming that the first launch minute was
  298.      hh:00) and always launch one after the other. In reality this
  299.      is not true.
  300.  
  301.  
  302.           The first launching schedule would look like this.
  303.  
  304.           1a. Job #1 launches at the first available minute.
  305.  
  306.           2a. Job #2 launches at the first available minute
  307.           after Job #1 completes.
  308.  
  309.           3a. Job #3 launches at first available minute after Job
  310.           #2 completes.
  311.  
  312.           The second and subsequent launchings might look like
  313.      this.
  314.  
  315.           1b. Job #1 launches 10 minutes after its's first
  316.           launching or at the first available minute after
  317.           Job #3 finishes or it may launch the first available
  318.           minute after Job #1 if Job #1 takes more than 10
  319.           minutes.
  320.  
  321.           2b. and 3b.  Who knows.
  322.  
  323.           The best way to get around this confusion is to do one
  324.      of three things.
  325.  
  326.           1. Carefully plan and test your incremental launchings.
  327.  
  328.           2. Rather than make your launchings incremental, make
  329.      them minute specific.  This may involve multiple line entries
  330.      into the CRONJR.SCH file for he same job at different times.
  331.  
  332.           3. Make Jobs 1, 2 and 3 one job.
  333.  
  334.  
  335.           The one thing you must remember.  The CRONJR.SCH file is
  336.      only loaded at the initial load time.  If you are running
  337.      CRONJR on a LAN and CRONJR is running on a remote machine and
  338.      you modify the remote machine's CRONJR.SCH file,  the remote
  339.      CRONJR will not reflect any of the changes made in the new
  340.      CRONJR.SCH file until the remote CRONJR is aborted and
  341.      reloaded.
  342.  
  343.  
  344.      Getting legal
  345.      -------------
  346.  
  347.           Software Shorts hereby disclaims all warranties relating
  348.      to this software, whether expressed or implied, including
  349.      without limitation any implied warranties of merchantability
  350.      or fitness for a particular purpose.  Software Shorts will
  351.      not be liable for any special, incidental, consequential,
  352.      indirect or similar damages due to loss of data or any other
  353.      reason, even if Software Shorts or an agent of Software
  354.      Shorts has been advised of the possibility of such damages.
  355.      Software Shorts will not be liable for any damages due to
  356.      malicious third party augmentation of the executable program.
  357.      In no event shall Software Shorts's liability for any damages
  358.      ever exceed the price paid for the license to use software,
  359.      regardless of the form of the claim.  The person using the
  360.      software bears all risk as to the quality and performance of
  361.      the software.
  362.  
  363.      Acknowledgements
  364.      ----------------
  365.  
  366.      Unix, cron and AT&T are registered trademarks of American
  367.           Telephone and Telegraph Corporation.
  368.      MPE and HP are copyrights of Hewlett Packard Company.
  369.      Sleeper is available through INTEREX
  370.      MS-DOS and OS/2 are a registered trademarks of
  371.           Microsoft Corporation.
  372.      NetWare is a registered trademark of Novell Incorporated
  373.      PS-Batch is a trademark of Brightwork Development Incorporated
  374.  
  375.      Software Shorts is not affiliated with any of the above
  376.      mentioned companies.
  377.  
  378.      One last word
  379.      -------------
  380.     
  381.           Software Shorts is dedicated to the creation and
  382.      dissemination of short, single focus, utility programs for
  383.      programmers.  Hence the name Software Shorts.  In the
  384.      tradition of true software geeks, Software Shorts believes
  385.      utility programs should be inexpensive, if not free, and in
  386.      the hands of as many people as possible.  However, Software
  387.      Shorts utility programs may not be distributed by any
  388.      individual or corporation as part of a commercial software
  389.      release, unless the utility has been licensed to that
  390.      individual or corporation for such distribution.
  391.     
  392.           The first version of CRONJR was released in November of
  393.      1988.  It has been thoroughly debugged.  It has also been in
  394.      constant use since that time, with it now being January 1990.
  395.  
  396.           If you find CRONJR to be a worthwhile program, a
  397.      contribution of $45.00 would be appreciated.  With each
  398.      contribution of $75.00 you will be registered to receive a
  399.      diskette with the next version of CRONJR, and other Software
  400.      Shorts utility programs when available.  Please state the
  401.      current version of the CRONJR program you have.
  402.  
  403.      Send contributions to:
  404.          Software Shorts
  405.          14101 Yorba Street  Suite 101
  406.          Tustin, CA 92680
  407.  
  408.           Since the primary distribution of this program will be
  409.      via bulletin boards and the targeted end users are LAN
  410.      managers, and programmers, it is strongly recommended that
  411.      you purchase a registered version of CRONJR for your own
  412.      security reasons. 
  413.      
  414.           If your company has been targeted by Software Shorts as
  415.      a company that could benefit from our products, then you may
  416.      be able to receive FREE Software Shorts utility distribution
  417.      diskettes.  These diskettes contain full working versions of
  418.      whatever software they contain.  These are not demo disks. 
  419.      These diskettes are not a solicitation for money or services.
  420.      
  421.  
  422.  
  423.          ----------------end-of-author's-documentation---------------
  424.  
  425.                          Software Library Information:
  426.  
  427.                     This disk copy provided as a service of
  428.  
  429.                            Public (software) Library
  430.  
  431.          We are not the authors of this program, nor are we associated
  432.          with the author in any way other than as a distributor of the
  433.          program in accordance with the author's terms of distribution.
  434.  
  435.          Please direct shareware payments and specific questions about
  436.          this program to the author of the program, whose name appears
  437.          elsewhere in  this documentation. If you have trouble getting
  438.          in touch with the author,  we will do whatever we can to help
  439.          you with your questions. All programs have been tested and do
  440.          run.  To report problems,  please use the form that is in the
  441.          file PROBLEM.DOC on many of our disks or in other written for-
  442.          mat with screen printouts, if possible.  PsL cannot debug pro-
  443.          programs over the telephone, though we can answer questions.
  444.  
  445.          Disks in the PsL are updated  monthly,  so if you did not get
  446.          this disk directly from the PsL, you should be aware that the
  447.          files in this set may no longer be the current versions. Also,
  448.          if you got this disk from another vendor and are having prob-
  449.          lems,  be aware that  some files may have become corrupted or
  450.          lost by that vendor. Get a current, working disk from PsL.
  451.  
  452.          For a copy of the latest monthly software library newsletter
  453.          and a list of the 2,000+ disks in the library, call or write
  454.  
  455.                            Public (software) Library
  456.                                P.O.Box 35705 - F
  457.                             Houston, TX 77235-5705
  458.  
  459.                                 1-800-2424-PSL
  460.                                  MC/Visa/AmEx
  461.  
  462.                           Outside of U.S. or in Texas
  463.                           or for general information,
  464.                               Call 1-713-524-6394
  465.  
  466.                           PsL also has an outstanding
  467.                           catalog for the Macintosh.
  468.  
  469.